<!DOCTYPE html>
<html lang="en">
<head>
	<{include file="header.html"}>
	<title>组卷管理-<{$user_data['school_name']}>-德安信会计在线教育平台</title>
	<style>
	.type_span{padding:3px 6px; border:1px solid red;}
	.selected{background-color:red};
	</style>
</head>
<body>
<div class="wrap">
	<!--star left-->
	<div class="column">
		<{include file="left_menu.html"}>
	</div>
	<div id="ContMianBox">
		<!--star子栏目-->
		<div class="sub-colum">
                <div class="tit"><{$left_menu_min.menu}></div>
                <ul>
                    <{foreach from=$left_menu_min.list item=item}>
                    <li <{if $item['url'] == $left_menu_min.curr}>class="curr"<{/if}>><a href="<{$item['url']}>"><{$item['name']}></a></li>
                    <{/foreach}>
                </ul>
            </div>
		<!--end子栏目-->
		<!--end left-->
		<div class="container narrow" add_url="/classes/add_home_work">
			<!--star conter-->
			<div class="cetContent">
				<div class="tit p-lr20">
                    <span><a href="/classes/home_work_list">作业列表</a></span>
                    <!-- <span class="curr">添加作业</span> -->
				</div>
				<div class="mainScroll">
					<div class="mainContainer line-all">
						<form class="layui-form " method="post" action="/classes/add_home_work">
							<div class="item m-b10 add_step" <{if $subject_id > 0}>style="display:none;"<{/if}>>
								<div class="layui-form-item">
									<label class="layui-form-label">作业名称</label>
									<div class="layui-input-block">
										<input type="text" name="name" id="name" value="<{$test_volume_name}>" class="layui-input" />
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">科目</label>
									<div class="layui-input-block">
										<select name="subject_id" id="subject_id" class="text">
											<option value="0">请选择科目</option>
											<{foreach from=$subject item=item}>
											<option value="<{$item.id}>" <{if $subject_id > 0 AND $subject_id == $item.id}>selected<{/if}>><{$item.title}></option>
											<{/foreach}>
										</select>
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">发布至</label>
                                    <{foreach from=$classes item=item}>
                                    <input name="classes[]" <{if $class_list|is_array AND $item.id|in_array:$class_list}>checked<{/if}> class="type_1 type_span" title="<{$item.class_name}>" value="<{$item.id}>" type="checkbox" />
                                    <{/foreach}>
                                </div>

								<div class="layui-form-item">
						      		<label class="layui-form-label">结束时间</label>
							      	<div class="layui-input-block">
							        	<input type="text" name="end_time" id="end_time" lay-verify="required|date" placeholder="yyyy-mm-dd hh:mm:ss" autocomplete="off" class="layui-input" value="<{if $end_time > 0}><{$end_time}><{/if}>" onclick="layui.laydate({elem: this,min: laydate.now(), format: 'YYYY-MM-DD hh:mm:ss', istime: true})">
							      	</div>
							    </div>

							    <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">老师提示</label>
                                    <div class="layui-input-block">
                                        <textarea class="layui-textarea" id="prompt" name="prompt"><{$prompt}></textarea>
                                    </div>
                                </div>

								<div class="layui-input-block">
									<input type="button" class="layui-btn" id="select_subject" value="下一步" />
									<input type="reset" class="layui-btn layui-btn-primary" value="重置" />
								</div>
							</div>

							<!--步骤二-->
							<div class="item m-b10 add_step" <{if $subject_id == 0}>style="display:none;"<{/if}>>
								<div class="layui-form-item">
									<label class="layui-form-label">组卷名称</label>
									<div class="layui-input-block">
										<input type="text" disabled value="<{$test_volume_name}>" class="layui-input" />
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">题目来源</label>
									<div class="layui-input-block">
										<select name="topic_source" id="source_type" lay-filter="source_type">
											<option value="0">全部题目</option>
											<option value="1">系统题目</option>
											<option value="2">自有题目</option>
										</select>
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">出题范围</label>
									<div class="layui-input-block acc-data-selector-selected" id="selected_chapter">
										<div style="float:left; width:100px;"><input class="layui-btn layui-btn-warm" id="chapter_id" value="选择章节" type="button" style="font-size: 14px;"></div>
										<div style="float:left;" id="selected_chapter"> </div>
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">出题类型</label>
									<div class="layui-input-block">
										<input type="radio" name="create_topic_type" value="1" checked  title="系统出题" lay-filter="create_topic_type">
										<input type="radio" name="create_topic_type" value="2"  title="自主出题" lay-filter="create_topic_type">
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">组卷模版</label>
									<div class="layui-input-block">
										<select name="template_id" id="template_id" lay-filter="template_id">
											<option value="">请选择模版</option>
											<option value="0">自定义模版</option>
											<{foreach from=$templates item=template}>
												<option value="<{$template.id}>"><{$template.template_name}></option>
											<{/foreach}>
										</select>
									</div>
								</div>

								<div class="layui-form-item" id="template_name" style="display: none;">
									<label class="layui-form-label">模版名称</label>
									<div class="layui-input-block">
										<input type="text" id="template_name_text" value=""  class="layui-input"/>
									</div>
								</div>

								<div class="layui-form-item template_box">
								    <label class="layui-form-label">单选题数量</label>
								    <div class="layui-input-inline">
								      	<input value="30" type="text" name="number[1]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <label class="layui-form-label">单题分值</label>
								    <div class="layui-input-inline">
								      	<input value="1" type="text" name="fraction[1]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <div class="layui-form-mid layui-word-aux">分</div>
							  	</div>

							  	<div class="layui-form-item template_box">
								    <label class="layui-form-label">多选题数量</label>
								    <div class="layui-input-inline">
							      		<input value="30" type="text" name="number[2]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <label class="layui-form-label">单题分值</label>
								    <div class="layui-input-inline">
								      	<input value="1" type="text" name="fraction[2]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <div class="layui-form-mid layui-word-aux">分</div>
							  	</div>

							  	<div class="layui-form-item template_box">
								    <label class="layui-form-label">判断题数量</label>
								    <div class="layui-input-inline">
							      		<input value="30" type="text" name="number[3]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <label class="layui-form-label">单题分值</label>
								    <div class="layui-input-inline">
								      	<input value="1" type="text" name="fraction[3]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <div class="layui-form-mid layui-word-aux">分</div>
							  	</div>

							  	<div class="layui-form-item template_box">
								    <label class="layui-form-label">计算分析题题数量</label>
								    <div class="layui-input-inline">
							      		<input value="30" type="text" name="number[4]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <label class="layui-form-label">单题分值</label>
								    <div class="layui-input-inline">
								      	<input value="1" type="text" name="fraction[4]" lay-verify="number" autocomplete="off" class="layui-input" />
								    </div>
								    <div class="layui-form-mid layui-word-aux">分</div>
							  	</div>


								<blockquote class="layui-elem-quote">
								  	<span class="total">作业总分：<i style="color:red;">100</i> 分</span>
									<span class="add_template"><input type="button" class="layui-btn layui-btn-normal layui-btn-radius" id="add_template" value="保存模板" /></span>
									<span class="remove_template" data-tid="" style="display:none">删除模板</span>
								</blockquote>



								<div id="topic_list" style="display:none;">
									<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
									  	<legend>答题卡</legend>
									</fieldset>

									<div class="layui-form-item layui-form-text">
									    <label class="layui-form-label">单选题</label>
									    <div class="layui-input-inline" id="type_box_1" style="margin-top: 15px;">
								      		<{section name=sn loop=30}>
											<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
											<input class="type_1 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
											<{/section}>
									    </div>
								  	</div>

								  	<div class="layui-form-item layui-form-text">
									    <label class="layui-form-label">多选题</label>
									    <div class="layui-input-inline" id="type_box_2" style="margin-top: 15px;">
								      		<{section name=sn loop=20}>
											<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
											<input class="type_2 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
											<{/section}>
									    </div>
								  	</div>

								  	<div class="layui-form-item layui-form-text">
									    <label class="layui-form-label">判断题</label>
									    <div class="layui-input-inline" id="type_box_3" style="margin-top: 15px;">
								      		<{section name=sn loop=30}>
											<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
											<input class="type_3 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
											<{/section}>
									    </div>
								  	</div>

								  	<div class="layui-form-item layui-form-text">
									    <label class="layui-form-label">计算分析题</label>
									    <div class="layui-input-inline" id="type_box_4" style="margin-top: 15px;">
								      		<{section name=sn loop=30}>
											<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
											<input class="type_4 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
											<{/section}>
									    </div>
								  	</div>

									<div id="type_1"></div>
									<div id="type_2"></div>
									<div id="type_3"></div>
									<div id="type_4"></div>
								</div>

								<iframe id="topic_list_box" border=2 frameborder=0 width="100%" height=500 marginheight=0 marginwidth=0 scrolling=no style="display:none;">
								</iframe>

								<div class="acc-data-selector" style=" display: none;">
									<div class="acc-data-selector-selected">

									</div>
									<{if $chapter_list_data|count  > 0}>
										<div class="acc-data-selector-table">
										<ul class="acc-data-selector-group">
										<{foreach from=$chapter_list_data item=item name=loop}>
											<li class="title act-showItems <{if $smarty.foreach.loop.index == 0}>active<{/if}>" data-gid="1"><{$item.title}></li>
										<{/foreach}>
										</ul>
										<{foreach from=$chapter_list_data item=item key=key name=loop1}>
											<{if isset($item.sub) AND $item.sub|count > 0}>
												<div class="acc-data-selector-list" <{if $smarty.foreach.loop1.index > 0}>style="display: none;"<{/if}>>
												<{foreach from=$item.sub item=item1}>
													<ul class="acc-data-selector-items">
													<li class="title"><{$item1.title}></li>
													<{if isset($item1.sub) AND $item1.sub|count > 0}>
														<{foreach from=$item1.sub item=item2}>
															<li class="item act-checkItem" topic_id="<{$item2.id}>"><i class="ico-check"></i><{$item2.title}></li>
														<{/foreach}>
													<{/if}>
													</optgroup>
													</ul>
												<{/foreach}>
												</div>
											<{/if}>
										<{/foreach}>
										</div>
									<{/if}>
									<i class="acc-data-selector-close act-close"></i>
								</div>
								<div class="layui-input-block">
									<input type="submit" class="layui-btn" value="下一步" />
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<{include file="footer.html"}>
<script src="/static/school/js/add_test_volume.js" type="text/javascript"></script>
</body>
</html>
